<extend name="Index::index"/>

<block name="main">
    <div class="layout-content">

        <div class="page-title">影院管理</div>

        <div class="content-top">
            <ul class="top-nav">
                <li class="active"><span>影院列表</span></li>
            </ul>
            <div class="clearfix"></div>
        </div>


        <!--content-main start-->
        <div class="container-fluid content-main">
            <div class="row">
                <div class="col-md-12">
                    <div class="col-md-12">

                        <?php if(isset($_SESSION['message'])){
                            $message = $_SESSION['message'];
                            unset($_SESSION['message']);
                            ?>
                        <div class="ui-tips bg-info">
                            <span class="icon glyphicon glyphicon-info-sign"></span>
                            <span><?php echo  $message ?></span>
                        </div>
                        <?php } ?>

                    <form action="{:U('User/index',['id'=>$val['id']])}" method="get" class="form-inline form-search mt15">
                        <div class="form-group">
                            <label>关键字搜索</label>
                            <input type="text" name="name" value="<?php echo $name ?>"  placeholder="影院名称" class="form-control input-sm"/>

                            <label>地址</label>
                            <input type="text" name="address" value="<?php echo $address ?>"  placeholder="影院地址" class="form-control input-sm"/>
                        </div>

                        <div>
                            <button type="submit" class="btn btn-success btn-sm">
                                <span class="glyphicon glyphicon-search"></span> 搜索
                            </button>
                        </div>
                    </form>

                    <div class="mt15 pr15">
                        <a href="{:U('User/create')}" class="btn btn-sm btn-success pull-right"><span
                                class="glyphicon glyphicon-plus"></span> 添加记录</a>

                        <div class="clearfix"></div>
                    </div>

                    <table class="table table-hover mt15">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>用户名</th>
                            <th>密码</th>
                            <th>影院名</th>
                            <th>地址</th>
                            <th>时间</th>
                            <th width="120">操作</th>
                        </tr>
                        </thead>
                        <tbody>
                        <notempty name="users">
                        <foreach name="users" item="val">
                        <tr>
                            <td>{$val['id']}</td>
                            <td>{$val['username']}</td>
                            <td>{$val['password_hash']}</td>
                            <td>{$val['name']}</td>
                            <td>{$val['address']}</td>
                            <td>{$val['created_at']}</td>
                            <td><a href="{:U('update',['id'=>$val['id']])}">修改</a></td>
                        </tr>
                        </foreach>
                            <else/>
                            没有数据
                        </notempty>
                        </tbody>
                    </table>

                    <div class="pull-right">
                      <!--  <span>共 100 条记录 </span>
                        <span>每页 20 条</span>-->
                                <span class="pagination">
                                    <!--<span class="prev-page disabled">上一页</span>
                                    <span class="active">1</span>
                                    <a href="">2</a>
                                    <a href="">3</a>
                                    <a href="" class="next-page">下一页</a>-->
                                    <?php echo $page->show();?>
                                    {$page}
                                </span>
                    </div>
                    <div class="clearfix"></div>

                </div>
            </div>


    </div>
    <!--右内容区域结束-->

    <div class="clearfix"></div>
    </div>
    </div>
    </section>

</block>
